package com.ruoyi.common.exception.modules;

import lombok.Getter;

@Getter
public final class CmsException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误提示
     */
    private String msg;

    public CmsException(String code, String msg) {
        super(code + ": " +msg);
        this.code = code;
        this.msg = msg;
    }

    public CmsException(String msg) {
        super(msg);
        this.code = "500";
        this.msg = msg;
    }

}
